//
// Created by 21577 on 2025/3/4.
//
#include<stdio.h>
int main(){
    int N1;
    scanf("%d",&N1);
    int M=1;
    while(M++){
        int temp=M;
        for(int i=1;i<N1;i++){
            temp=temp/2-1;
        }
        if(temp==1)
            break;
    }
    printf("%d",M);
        int N, peaches = 1;
        scanf("%d", &N);
        for (int i = 1; i < N; i++) {
            peaches = (peaches + 1) * 2;
        }
        printf("%d\n", peaches);

    return 0;
}
